﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace ass5Vinyl.VIEW
{
    public partial class CustomerInsertion : Form
    {
        CONTROLLER.Customers cs;
        public CustomerInsertion()
        {
            cs = new CONTROLLER.Customers();
            InitializeComponent();
        }
        
        private void b_insert_Click(object sender, EventArgs e)
        {
            CONTROLLER.Customer customer = new CONTROLLER.Customer();
            customer.cId = Convert.ToInt32(tb_id.Text);
            customer.cName= tb_firstName.Text;
            customer.CLastName = tb_lastName.Text;
            customer.cAdderess = tb_adderss.Text;
            customer.cPhone = tb_phone.Text;
            customer.cBirthDay = tb_date.Text;
            string ans = cs.InsertCustomer(customer);
            System.Windows.Forms.MessageBox.Show(ans);
        }
    }
}
